package com.panfeng.xcloud.boss.provider.assets.dao.mapper;

import com.panfeng.xcloud.dao.assets.entity.UserBot;
import com.panfeng.xcloud.dao.assets.mapper.UserBotMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserBotMapperExt extends UserBotMapper {

    List<UserBot> selectBotsByUserId(@Param("status") Integer status,
                                     @Param("userId") String userId,
                                     @Param("exchangeType") Integer exchangeType);

    int updateByUserIdAndCoin(@Param("userId") String userId,
                               @Param("destinationCoin") String destinationCoin,
                               @Param("sourceCoin") String sourceCoin,
                               @Param("status") Integer status,
                               @Param("direction") String direction,
                               @Param("leverRate") Integer leverRate,
                               @Param("exchangeType") Integer exchangeType);

    UserBot selectByUserIdAndCoinAndDirectionAdnLever(@Param("userId") String userId,
                                                      @Param("destinationCoin") String destinationCoin,
                                                      @Param("sourceCoin") String sourceCoin,
                                                      @Param("direction") String direction,
                                                      @Param("leverRate") Integer leverRate,
                                                      @Param("exchangeType") Integer exchangeType);

    List<UserBot> selectByUserIdAndCoin(@Param("userId") String userId,
                                        @Param("destinationCoin") String destinationCoin,
                                        @Param("sourceCoin") String sourceCoin,
                                        @Param("exchangeType") Integer exchangeType);

    List<UserBot> selectLikeCoin(@Param("userId") String userId,
                                 @Param("destinationCoin") String destinationCoin,
                                 @Param("sourceCoin") String sourceCoin,
                                 @Param("exchangeType") Integer exchangeType,
                                 @Param("status") Integer status);

}